import { FC } from "react" 
import {RouteComponentProps} from 'react-router-dom'
// RouteComponentProps路由组件的类型声明
type Iprops={
    age:number
} & RouteComponentProps<{id:string}>
const Friend:FC<Iprops>=(props)=>{
    console.log(props);
    
    return(
        <fieldset>
            <legend>朋友</legend>
            <h2>动态路由参数{props.match.params.id}</h2>
            <h3>牛奶</h3>
            <h3>雪碧</h3>
            <h3>可乐</h3>
            <h3>椰汁</h3>
            <h3>果茶</h3>
            <h3>奶茶</h3>
        </fieldset>
    )
}

export default Friend